import request from "@/utils/request";

// 查询社区列表
export function listCommunity(query) {
  return request({
    url: "/community/listPage",
    method: "get",
    params: query,
  });
}

// 查询社区详细（根据Id查询单个）
export function getCommunityById(Id) {
  return request({
    url: "/community/selectOne/" + Id,
    method: "get",
  });
}

// 查询社区详细（查询下拉选择数据）
export function getCommunity(query) {
  return request({
    url: "/community/selectAll",
    method: "get",
    params: query,
  });
}

// 新增社区
export function addCommunity(data) {
  return request({
    url: "/community/add",
    method: "post",
    data: data,
  });
}

// 修改社区
export function updateCommunity(data) {
  return request({
    url: "/community/update",
    method: "put",
    data: data,
  });
}

// 删除社区
export function delCommunity(Id) {
  return request({
    url: "/community/delete/" + Id,
    method: "delete",
  });
}
export function reservationupdateStatus(data) {
  return request({
    url: "/reservation/updateStatus",
    method: "post",
    data: data,
  });
}
